package com.cloud.async.util;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.Supplier;

public class CompletableFutureUtils {


    public <T> void test(Supplier<T> task, String taskId, Class<T> rsp, Executor executor) {
        CompletableFuture<T> result = CompletableFuture
                .supplyAsync(task::get, executor)
                .whenComplete((resp, ex) -> {

                }).exceptionally(ex -> {
                    return null;
                });
    }


}
